{layout name="layout" /}
<div class="tipbox tipbox-error mb5">
    <span class="fn-fb">友情提示:</span>
    <br />聚变类型,默认只保产品本金给用户,并且不奖励推广用户,如需要开启,请到配置中打开（开启后用户的利润和奖励资金由公司承担）
</div>  
<form id="form" action="{:url('fastshop/sale/add')}">
    <table class="formtable" id="gift">
        <tr>
            <th>时间分类:</th>
            <td>
                <select datatype="*" class="select w150" name="category_id">
                    <option value="0">不分时间</option>
                    {foreach $times as $rs}<option value="{$rs.id}">{$rs.name}</option>{/foreach}
                </select>
                <span class="gray">可不选择抢购时间归类</span>
            </td>
        </tr>
        <tr>
            <th>活动类型:</th>
            <td>
                <select datatype="*" class="select w150 is_fusion" name="is_fusion">
                    <option value="0">裂变类型</option>
                    <option value="1">聚变类型</option>
                </select>
            </td>
        </tr>
        <tr><th>活动名称:</th><td><input class="input w500" datatype="*" type="text" name="title" /></td></tr>
        <tr>
            <th>活动状态:</th>
            <td>
                <select datatype="*" class="select w150" name="types">
                    <option value="0">下线中</option>
                    <option value="1">上线中</option>
                </select>
                <select datatype="*" class="select w150" name="is_vip">
                    <option value="0">普通活动</option>
                    <option value="1">会员活动</option>
                </select>
                <select datatype="*" class="select w150" name="is_newuser">
                    <option value="0">老用户</option>
                    <option value="1">新用户</option>
                </select>
            </td>
        </tr>
        <tr>
            <th>活动时间:</th>
            <td>
                <input readonly placeholder="开始时间" class="input w160 ui-time" datatype="date" type="text" name="start_time" />
                <span class="blue">至</span> 
                <input readonly placeholder="结束时间" class="input w160 ui-time" datatype="date" type="text" name="end_time" />
            </td>
        </tr>
        <tr>
            <th>产品数量:</th>
            <td>
                <input class="input w80" datatype="n" type="text" name="sale_nums" />
                <span class="gray">未提货商品数量:<span id="entrust_number" class="red fn-f16 fn-fb"> 0 </span></span>
            </td>
        </tr>
        <tr>
            <th></th>
            <td class="input-group">
                <input readonly value="产品ID" class="input fn-tac readonly disabled w100" type="text" />
                <input readonly value="成本价" class="input fn-tac readonly disabled w100" type="text" />
                <input readonly value="销售价" class="input fn-tac readonly disabled w100" type="text" />
                <input readonly value="市场价" class="input fn-tac readonly disabled w100" type="text" />
            </td>
        </tr>
        <tr>
            <th class="item_title">销售产品:</th>
            <td class="input-group">
                <input autocomplete="off" id="item_id" class="win w100 input readonly" datatype="n" type="text" name="item_id" readonly/>
                <input autocomplete="off" id="cost_price" class="input w100" datatype="npot" type="text" name="cost_price" />
                <input autocomplete="off" id="sale_price" class="input w100" datatype="npot" type="text" name="sale_price" />
                <input autocomplete="off" id="market_price" class="input w100" datatype="npot" type="text" name="market_price" />
            </td>
        </tr>
        <tr>
            <th class="gift_title">赠送产品:</th>
            <td class="input-group">
                <input autocomplete="off" id="0" readonly class="win w100 readonly input gift_item_id_0" datatype="n" type="text" name="gift[item_id][]" />
                <input autocomplete="off" id="gift_cost_price_0" class="input w100" datatype="npot" type="text" name="gift[cost_price][]" />
                <input autocomplete="off" class="input w100" datatype="npot" type="text" name="gift[sale_price][]" />
                <input autocomplete="off" class="input w100" datatype="npot" type="text" name="gift[market_price][]" />
                <div class="fn-left w50 fn-tac fn-cp" id="add"><i class="iconfont icon-add_icon"></i></div>
            </td>
        </tr>
        <tr class="gift">
            <th></th>
            <td>
                <input type="submit" value="确定" class="button button-blue submit" />
                <input type="reset" value="重置" class="button button-blank" />
            </td>
        </tr>
    </table>
</form>
{include file="sale:js" /}